'use strict';

module.exports = app => {
  const { STRING, UUID, UUIDV4, INTEGER } = app.Sequelize;

  const model = app.model.define('dept', {
    id: {
      type: INTEGER,
      primaryKey: true,
      comment: '主键 部门Id',
    },
    name: {
      type: UUID,
      allowNull: false,
      comment: '部门名称',
    },
    parentid: {
      type: INTEGER,
      comment: '上级部门Id',
    },
  }, {
    tableName: 'dept',
    comment: '部门表',
  });

  return model;
};
